import 'package:distribution_mall_flutter/constant/constant.dart';
import 'package:distribution_mall_flutter/generated/l10n.dart';
import 'package:distribution_mall_flutter/router/router.dart';
import 'package:distribution_mall_flutter/widgets/navigation_item.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ContentItems extends StatefulWidget {
  const ContentItems({super.key});

  @override
  State<ContentItems> createState() {
    return ContentItemsState();
  }
}

class ContentItemsState extends State<ContentItems> {
  List<Map<String, dynamic>> items = [
    // {'text': S.current.my_changePass, 'path': RouterName.login},
    // {'text': S.current.my_address, 'path': RouterName.productDetails},
    // {'text': S.current.my_contact, 'path': RouterName.login},
    // {'text': '公平公正', 'path': RouterName.fortune},
    // {'text': '11111111', 'path': RouterName.fortuneCradle},
  ];

  @override
  Widget build(BuildContext context) {
    return Expanded(
        child: SingleChildScrollView(
      child: Column(
        children: items
            .map((item) => EPNavigationItem(
                  isLineNav: true,
                  leftText: item['text'],
                  onTap: () {
                    print('------');
                    // EPRouter.router.goNamed(item['path']);
                    appRouter.pushNamed(item['path']);
                  },
                ))
            .toList(),
      ),
    ));
  }
}
